// components/tababr/tababr.js

const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    active: {
      type: String,
      value: ''
    },
  },
  /** 
   * 组件的初始数据 
   */
  data: {
    list:[
      {
        pagePath:"/pages/pointsShop/pointsShop",
        iconPath: "/image/pointsShop/tabBar/goods.png",
        selectedIconPath: "/image/pointsShop/tabBar/goods_selected.png",
        text: "商品",
        id:0
      },
      {
        pagePath: "/pages/pointsShopCar/pointsShopCar", 
        iconPath: "/image/pointsShop/tabBar/cart.png",
        selectedIconPath: "/image/pointsShop/tabBar/cart_selected.png",
        text: "购物车",
        id:1
      },
      {
        pagePath:"/pages/pointsShopOrder/pointsShopOrder",
        iconPath: "/image/pointsShop/tabBar/order.png", 
        selectedIconPath: "/image/pointsShop/tabBar/order_selected.png",
        text: "订单",
        id:2
      }
    ]
  },
  ready(){
    // const sysInfo = wx.getSystemInfoSync();
   
  },
  /**
   * 组件的方法列表
   */
  methods: {
    changePage(e){  
      wx.redirectTo({
        url: e.currentTarget.dataset.item.pagePath,
        fail:(err)=>{
          console.log(err)
        }
      })
    }
  },
}) 